package org.csc.sss.datacore.config;

import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;

public class GenerateConfig {

    /**
     * 获取配置信息
     */
    public static Configuration getConfig() {
        try {
            return new PropertiesConfiguration("config.properties");
        } catch (ConfigurationException e) {
            throw new RuntimeException("加载配置文件失败");
        }
    }

    public static void main(String[] args) {
        Configuration config = GenerateConfig.getConfig();
        System.out.println(config.getString("ui_ip"));
    }
}
